#ifndef _BINOP_H_
#define _BINOP_H_
#include "ast/exprType.h"
#include "ast/operatorType.h"
#include "AstTypes.h"
class IVisitor;
class BinOp;
typedef QSharedPointer<BinOp> BinOpPtr;

class BinOp: public exprType
{
public:
    explicit BinOp(const exprTypePtr& left, int op, const exprTypePtr& right, int nodeId=-1);
    virtual ~BinOp();
    
    
    exprTypePtr left();
    void setLeft(const exprTypePtr& left);
    
    int op();
    void setOp(int op);
    
    exprTypePtr right();
    void setRight(const exprTypePtr& right);
    
    
    virtual Ast::AstTypes type() const;
    virtual QString toString() const;
    virtual void accept(IVisitor* visitor, const SimpleNodePtr& node);
    virtual void traverse(IVisitor* visitor);
private:
    exprTypePtr _left;
    int _op;
    exprTypePtr _right;
};




#endif